import Vue from 'vue'
import Router from 'vue-router'

import home from '@/view/home/home'
import centre from '@/view/centre/centre'
import shopCar from '@/view/shopCar/shopCar'
import search from '@/view/search/search'
import newslist from '@/view/news/newslist'
import NewsInfo from '@/view/news/NewsInfo'
import PhotoList from '@/view/photos/PhotoList'
import PhotoInfo from '@/view/photos/PhotoInfo'
import GoodsList from '@/view/goods/GoodsList'
import GoodsInfo from '@/view/goods/GoodsInfo'
import GoodsDesc from '@/view/goods/GoodsDesc'
import GoodsComment from '@/view/goods/GoodsComment'



Vue.use(Router);

export default new Router({
  routes: [
      { path:'/', redirect:'/home'},
      { path: '/home', component: home},
      { path: '/centre', component: centre},
      { path: '/shopCar', component: shopCar},
      { path: '/search', component: search},
      { path: '/home/newslist', component: newslist},
      { path: '/home/newsinfo/:id', component: NewsInfo},
      { path: '/home/photolist', component: PhotoList},
      { path: '/home/photoinfo/:id', component: PhotoInfo},
      { path: '/goods/goodslist', component: GoodsList},
      { path: '/goods/goodsinfo/:id', component: GoodsInfo, name:'goodsinfo'},
      { path: '/goods/goodsdesc/:id', component: GoodsDesc, name:'goodsdesc'},
      { path: '/goods/goodscomment/:id', component: GoodsComment, name:'goodscomment'}
  ],
  linkActiveClass: 'mui-active',
  mode:"history"
})

